﻿using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using Xms.Abp.Application.Services;

namespace IdentityManagement
{
    public interface IIdentityUserAppService 
        : IXmsCrudAppService<
            IdentityUserResult, 
            Guid, 
            IdentityUserPagedParameter, 
            IdentityUserCreateParameter, 
            IdentityUserUpdateParameter>
    {
        Task<List<IdentityRoleResult>> GetRolesAsync(Guid id);

        Task<List<IdentityRoleResult>> GetAssignableRolesAsync();

        Task UpdateRolesAsync(Guid id, IdentityUserUpdateRolesParameter input);

        Task<IdentityUserResult> FindByUsernameAsync(string userName);

        Task<IdentityUserResult> FindByEmailAsync(string email);
        Task<IdentityUserResult> FindByPhoneNumberAsync(string email);
    }
}
